<table id='lista'>
  <thead>
    <tr>
      <th>Plant</th>
      <th>Subplant</th>
      <th>Brand</th>
      <th>Model</th>
      <th>SN</th>
      <th>Type</th>
      <th>Subtype</th>
      <th>Label</th>
      <th>Src</th>
      <th>Id</th>
      <th>Src2</th>
      <th>Id2</th>
      <th>Power</th>
      <th>Quant.</th>
      <th>Note</th>
    </tr>
  </thead>
  <tbody>
    <?php 
    foreach ($powerdevs as $key=>$powerdev): 
        $odd = fmod($key, 2) ? 'odd' : 'even'?>
    <tr class="<?php echo $odd ?>">
      <td><a href="<?php echo url_for('plant_show',$powerdev->getPlant())?>"><?php echo $powerdev->getPlant() ?></a></td>
      <td><?php echo $powerdev->getSubplant() ?></td>
      <td><?php echo $powerdev->getBrand() ?></td>
      <td><?php echo $powerdev->getModel() ?></td>
      <td><?php echo $powerdev->getSerial() ?></td>
      <td><?php echo $powerdev->getType() ?></td>
      <td><?php echo $powerdev->getSubtype() ?></td>
      <td><?php echo $powerdev->getLabel() ?></td>
      <td><?php echo $powerdev->getSource() ?></td>
      <td><?php echo $powerdev->getAddress() ?></td>
      <td><?php echo $powerdev->getSource2() ?></td>
      <td><?php echo $powerdev->getAddress2() ?></td>
      <td><?php echo $powerdev->getPower() ?></td>
      <td><?php echo $powerdev->getQuantity() ?></td>
      <td><?php $note=strlen($powerdev->getNote())>sfConfig::get('app_max_cell_chars')?substr($powerdev->getNote(), 0, sfConfig::get('app_max_cell_chars'))." ..":$powerdev->getNote(); echo $note ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
